const mongoose = require('mongoose')
const Schema = mongoose.Schema

let mottoSchema = new Schema(
  {
    // 经典
    motto: {
      type: String,
      required: true
    },
    // 经典出处
    mottoRef: {
      type: String,
      required: true
    },
    // 分类： 1儒 2释 3道
    classify: {
      type: Number,
      default: 1
    },
    // 状态：0未发布 1已发布
    status: {
      type: Number,
      default: 1
    },
    // 点赞数
    likes: [String],
    // 预留字段
    video: {
      type: String,
      default: ''
    },
    audio: {
      type: String,
      default: ''
    }
  },
  {
    versionKey:false
  }
)

module.exports = mongoose.model("motto", mottoSchema)